$OpenBSD: README-common,v 1.8 2017/06/15 14:40:37 ajacoutot Exp $

+-----------------------------------------------------------------------
| Running ${FULLPKGNAME} on OpenBSD
+-----------------------------------------------------------------------

This is a common README for all HPLIP packages.

Communication with local printers is done via CUPS over libusb, make
sure you read the "USB" section of the documentation that comes with the
cups package (cf. ${LOCALBASE}/share/doc/pkg-readmes/cups-*).

If you care about device information (e.g. ink status), you should use
the HP tools to install and communicate with it (see below).

Printing
========

Installing a printer automatically using the HP tools
-----------------------------------------------------
(req. hplip, opt. hplip-gui)

To add a CUPS printer, run the following command as root
(prerequisite: the DBus and CUPS daemons must be running):
    hp-setup -i

Alternatively, if you have hplip-gui installed, you can use the
graphical interface by just running the following as root:
    hp-setup

Installing a printer manually
-----------------------------
(req. hpcups, opt. hpijs)

To manually add a CUPS printer without using the native HP tools from
the hplip package you must know the device URI of the printer. This URI
is created using the 'hp-makeuri' utility from the hplip package, but
once known, hplip is not needed and can be pkg_delete(1)d.

e.g. for a network printer:
    hp-makeuri -c 192.168.10.100
    CUPS URI: hp:/net/Officejet_7500_E910?ip=192.168.10.100

Then add an 'HP Printer (HPLIP)' entry in CUPS with the corresponding
URI (using the CUPS web interface or lpadmin(8)).

Network printers can also be used through JetDirect and/or LPD, in which
case it is not necessary to create a URI; the spooler can be configured
to use a direct connection.
For example:
    socket://192.168.255.14:9100
    lpd://192.168.255.14/lp

Alternatively, the printer can be configured to use the foomatic print
framework using the hpijs package (useful for direct printing without
CUPS). For more information, see:
    ${LOCALBASE}/share/doc/pkg-readmes/cups-filters-*

Scanning
========

Installing a scanner automatically using the HP tools
-----------------------------------------------------
(req. hplip+hpaio)

First, install the printing part of you all-in-one printer using the HP
tools as documented above.

Once configured in CUPS with an hp:// URI, then it should work out of
the box using hp-scan and/or sane(7)-compatible applications.
e.g.
    scanimage -L                       
    device `hpaio:/net/Officejet_7500_E910?zc=oj-7500a' is a Hewlett-Packard Officejet_7500_E910 all-in-one

Installing a scanner manually
-----------------------------
(req. hpaio)

To manually add a scanner without using the native HP tools from the
hplip package you must know the device URI of the scanner. This URI is
created using the 'hp-makeuri' utility from the hplip package, but once
known, hplip is not needed and can be pkg_delete(1)d.

e.g. for a network scanner:
    hp-makeuri -s 192.168.10.100
    SANE URI: hpaio:/net/Officejet_7500_E910?ip=192.168.10.100

Then pass this URI to your sane(7)-compatible application.
e.g.
    xsane hpaio:/net/Officejet_7500_E910?ip=192.168.10.100

Note that in this mode, not all applications will be able to detect your
scanner; if that's an issue, install your scanner using the HP tools as
documented above.

Plugin installation
===================
(req. hplip)

Some devices will not work properly without a corresponding proprietary
binary plugin. HPLIP plugins automated installation is not available on
OpenBSD but it can be installed manually by running the following as
root (or as a regular user with su(1) rights):
    cd /tmp
    ftp http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-${V}-plugin.run
    /bin/sh ./hplip-${V}-plugin.run --keep 2>/dev/null
    cd plugin_tmp && ${MODPY_BIN} ./plugin_install.py -i
